<?php
session_start();
include('connection.php');
if(isset($_SESSION['username']) || isset($_SESSION['password']))
{
?>
<html>
 <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../docs-assets/ico/favicon.png">

    <title>Starter Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- Custom styles for this template -->
   

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    
       <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>

         <script src="js/bootstrap.js"></script>  
         
         <script src="datepicker/js/bootstrap-datepicker.js"></script>
                 <script type="text/javascript">
 $(function(){
	  $("#news").submit(function(e){
		 
       e.preventDefault();
 
      
			dataString= $('#news').serialize();
			$.ajax({
			
			type: "POST",
			url: "newsconfirom.php",
			data: dataString,
				success: function(response){
					
					alert(response);
				
		}
		});});
	  $('.dpYears').datepicker();
 });

</script>

         <link href="datepicker/css/datepicker.css" rel="stylesheet"/>
         <link href="datepicker/less/datepicker.less" rel="stylesheet" />
      

    
    
  </head>
  <body>
<?php include('addminmenu.php'); ?>
<div class="container" style="margin-top:107px;">
<div><a href="module.php">Module</a> >></div>
	<div class="row">
    <div class="col-sm-8 col-sm-offset-2">
<div class="table">
				<table>
                <tr><th>Module</th><th>Description</th><th>Add New</th><th>List</th></tr>
                 <tr><th>News</th><th>Add Latest News</th><th><a href="newsform.php">Add News</a></th><th><a href="list.php?list=event">List News</a></th></tr>
               
                </table>
					</div>
                    </div>
                    </div>
                    </div>
                    <?PHP

}
else
{	header("location:index.php");
}
?>
</body>
</html>